import React, { Component } from 'react'
import {
    Switch,
    Route,
    Redirect
} from "react-router-dom"
import News from './News'
import Article from './Article'
import {renderRoutes} from 'react-router-config'
export default class About extends Component {
    constructor(props){
        super(props)
        this.state={
            id:'1001'
        }
    }
    render() {
        return (
            <div>
                <Switch>
                    {/* <Route path="/about/news" component={News}></Route>
                    <Route path="/about/article" component={Article}></Route> */}
                    {renderRoutes(this.props.route.children)}
                    {/* <Redirect from="/about" to="/about/news"></Redirect> */}
                </Switch>
            </div>
        )
    }
    handleToggle=()=>{
        this.props.history.push("/detail?id='1001'")
    }
}
